using System;
/*
 * http://tools.ietf.org/rfc/rfc2930.txt
 * 
2. The TKEY Resource IRecord

   The TKEY resource record (RR) has the structure given below.  Its RR
   type code is 249.

      Field       Type         Comment
      -----       ----         -------
       Algorithm:   domain
       Inception:   u_int32_t
       Expiration:  u_int32_t
       Mode:        u_int16_t
       Error:       u_int16_t
       Key Size:    u_int16_t
       Key Data:    octet-stream
       Other Size:  u_int16_t
       Other Data:  octet-stream  undefined by this specification

 */

namespace System.Net.DnsToolkit.Packet.Records
{
	public class RecordTKEY : IRecord
	{
        public string ALGORITHM { get; set; }
        public UInt32 INCEPTION { get; set; }
        public UInt32 EXPIRATION { get; set; }
        public UInt16 MODE { get; set; }
        public UInt16 ERROR { get; set; }
        public UInt16 KEYSIZE { get; set; }
        public byte[] KEYDATA { get; set; }
        public UInt16 OTHERSIZE { get; set; }
        public byte[] OTHERDATA { get; set; }

        public QTypeEnum QType {
            get {
                return QTypeEnum.TKEY;
            }
        }
 public override string ToString()
		{
			return string.Format("{0} {1} {2} {3} {4}",
				ALGORITHM,
				INCEPTION,
				EXPIRATION,
				MODE,
				ERROR);
		}

	}
}
